package com.xyzwps.orm.ebean.repository;

import com.xyzwps.orm.repository.TablesRepository;
import io.ebean.Database;

import java.util.Objects;

public class EbeanTablesRepository implements TablesRepository {

    private final Database db;

    public EbeanTablesRepository(Database db) {
        this.db = Objects.requireNonNull(db);
    }

    @Override
    public void cleanAllTables() {
        db.sqlUpdate("delete from tag").execute();
        db.sqlUpdate("delete from user").execute();
    }
}
